import axios from 'axios';

const checkLogin = ( callback:Function ) => {

    const token:string|null = localStorage.getItem('token');
    let url:any = window.VITE_URL + '/admin.user/check';
    // let url:any = process.env.VUE_APP_URL + '/api/check/login';
    url += '?token=' + token;
    axios.get( url ).then(res=>{

        if( typeof callback == 'function' ){
            callback( res.data );
        }

    });


}

export default checkLogin;